package com.lt.interactive.sms.cotroller;

import com.lt.bcra.result.ResultData;
import com.lt.interactive.sms.service.MsmService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;



@Api(tags = "短信服务")
@RestController
@RequestMapping("/sso/sms")
public class BcraSmsController {

    @Autowired
    private MsmService msmService;

    private static Logger log = LoggerFactory.getLogger(BcraSmsController.class);

    //发送手机验证码
    @GetMapping("send/{phone}")
    @ApiOperation("发送短信验证码")
    public ResultData sendCode(@PathVariable String phone) {
        if (log.isDebugEnabled()) log.debug("发送获取短信验证码 BcraSmsController");

        return  msmService.send(phone);
    }
}
